import json
import math
import time
import copy
import random
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from wsbignn import WSBiGNN
import matplotlib.pyplot as plt
from matplotlib import pyplot as plt
torch.autograd.set_detect_anomaly(True)
<torch.autograd.anomaly_mode.set_detect_anomaly at 0x7f79fc59b0d0>
#1. set parameters
#2. visualization
#3. compute the loss
#4. initialize user embeddings
#5. compute adjacency matrix based on mobility and web search
#6. train
#7. compute the Recall and NDCG
#8. main
#9. save
print (torch.cuda.is_available())
device = torch.device("cuda:0")
random_seed = 42
random.seed(random_seed)
torch.manual_seed(random_seed)
torch.cuda.manual_seed(random_seed)
r = random.random
True
x_day, y_day = 4, 1
case = str(x_day) + "_" + str(y_day)
train_ratio, validate_ratio = 0.70, 0.10
top_k, npr = 3, 5
num_epochs, batch_size, learning_rate = 200, 2, 0.001
hid_dim = 32
hid_dim_cons = 32
hyper_param = {"n_e": num_epochs, "b_s": batch_size, "l_r": learning_rate, "top_k": top_k}
root_path = "/home/umni2/a/umnilab/users/xue120/umni4/2023_web_mobility_summer"+\
"/1_data_check/data_feature_generation/"
file_name = root_path + "feature_" + str(x_day) + "_" + str(y_day)
train_path = file_name + "/train.json"
vali_path = file_name + "/validate.json"
test_path = file_name + "/test.json"
sampled_user_location_path = file_name + "/sampled_user_location.json"
member_path = root_path + "member/"
def visual_train_loss(e_losses):
plt.figure(figsize=(4,3), dpi=300)
x = range(len(e_losses))
y1 = copy.copy(e_losses)
plt.plot(x,y1, linewidth=1, label="train")
plt.legend()
plt.title('Loss decline on training data')
plt.xlabel('Epoch')
plt.ylabel('Loss')
plt.savefig(case + '/' + 'train_loss.png',bbox_inches = 'tight')
plt.show()
def visual_vali_test_loss(recall_vali, recall_test, ndcg_vali, ndcg_test):
plt.figure(figsize=(4,3), dpi=300)
x = range(len(recall_vali))
plt.plot(x, recall_vali, linewidth=1, label="Recall_validate")
plt.plot(x, ndcg_vali, linewidth=1, label="NDCG_validate")
plt.plot(x, recall_test, linewidth=1, label="Recall_test")
plt.plot(x, ndcg_test, linewidth=1, label="NDCG_test")
plt.legend()
plt.title('Recall/NDCG on validate/test sets')
plt.xlabel('Epoch')
plt.ylabel('Recall@3, NDCG@3')
plt.savefig(case + '/' + 'vali_test_recall_ndcg.png',bbox_inches = 'tight')
plt.show()
#compute the cross entropy loss
#input1: gnn_output dim = (batch, y_day, U, V).
#input2: real_link dim = (batch, y_day, n_edge, 2).
#input3: criterion
#inputs 4,5,6: n_user, n_loc, npr
#output: average loss for batch*y_day terms
def compute_loss(gnn_output, real_link, criterion, n_user, n_loc, npr):
batch, y_day = gnn_output.size()[0], gnn_output.size()[1]
loss = torch.tensor([0.0])
all_edge = [str(u)+"_"+str(v) for u in range(n_user) for v in range(n_loc)]
for i in range(batch):
for j in range(y_day):
predicted, real = gnn_output[i][j], real_link[i][j]
#positive edges
str_real = [str(int(real[k][0])) + "_" + str(int(real[k][1])) for k in range(len(real))]
num_real = len(real) - str_real.count(str(-1)+"_"+str(-1))
set_pos = set(str_real[0: num_real])
all_pos = list(set_pos)
n_pos = len(all_pos)
#sample negative edges
all_neg = list(set(all_edge) - set_pos)
n_sampled_neg = int(n_pos * npr)
sampled_neg = random.sample(all_neg, n_sampled_neg)
#prepare for loss computing
pos = [[int(item.split("_")[0]), int(item.split("_")[1])] for item in all_pos]
neg = [[int(item.split("_")[0]), int(item.split("_")[1])] for item in sampled_neg]
pos_idx = [pos[k][0]*n_loc + pos[k][1] for k in range(n_pos)]
neg_idx = [neg[k][0]*n_loc + neg[k][1] for k in range(n_sampled_neg)]
hat_1_pos = torch.take(predicted, torch.tensor(pos_idx))
hat_1_neg = torch.take(predicted, torch.tensor(neg_idx))
hat_1 = torch.sigmoid(torch.cat((hat_1_pos, hat_1_neg)).unsqueeze(dim=0))
hat = torch.log(torch.transpose(torch.cat((1.0-hat_1, hat_1), dim=0),1,0)) #NLLLOSS
real = torch.tensor([1]*n_pos + [0]*n_sampled_neg)
loss += criterion(hat, real)
loss = loss*1.0/(batch*y_day)
return loss
#define user embeddings based on POI embeddings.
#input1: x_loc dim = (V, 200)
#input2: x_mob_batch dim = (batch, x_day, n_m, 2)
#input3: x_text_batch dim = (batch, x_day, n_t, 2)
#input4: n_user
#output: x_user dim = (batch, U, 200)
def compute_user_embedding(x_loc, x_mob_batch, x_text_batch, n_user):
x_user = torch.zeros((0, n_user, 200), device=device)
x_m_t_batch = torch.cat([x_mob_batch, x_text_batch], dim=2) #dim = (batch, x_day, n_m+n_t, 2)
batch = x_m_t_batch.size()[0]
for i in range(batch):
#initialize
user_sum_embed = torch.zeros((n_user, 200), device=device)
user_ave_embed = torch.zeros((n_user, 200), device=device)
user_count_embed, user_with_edge = [0]*n_user, list()
#update user embeddings
link_record = x_m_t_batch[i][0] #extract the first day
for link in link_record:
if link[0] != -1:
user, loc = link[0], link[1]
user_with_edge.append(user)
user_count_embed[user] = user_count_embed[user] + 1
user_sum_embed[user] = user_sum_embed[user] + x_loc[loc]
else:
break
set_user_with_edge = set(user_with_edge)
for user in set_user_with_edge:
user_ave_embed[user] = user_sum_embed[user]/user_count_embed[user]
#update the user embedding for other users with mobility records on the first day
#compute the average embedding
n_user_with_edge = len(set_user_with_edge)
ave_embedding = torch.sum(user_ave_embed, dim=0)/(1.0*n_user_with_edge)
#define the embeddings for remaining users as the average embedding
set_remain = set(range(n_user))-set_user_with_edge
dict_remain = {user:0 for user in set_remain}
for user in dict_remain:
user_ave_embed[user] = ave_embedding
#concatenate different batches
x_user = torch.cat([x_user, user_ave_embed.unsqueeze(0)],dim=0)
return x_user
#input1: x_mob_batch dim = (batch, x_day, n_m, 2)
#input2: x_text_batch dim = (batch, x_day, n_t, 2)
#inputs3,4: u_user, n_loc
#output1: x_adj dim = (batch, x_day, n_user+2*n_loc, n_user+2*n_loc)
def convert_to_adj(x_mob_batch, x_text_batch, n_user, n_loc):
time_1 = time.time()
batch, x_day = x_mob_batch.size()[0], x_mob_batch.size()[1]
adj_dim = n_user + 2*n_loc
adj = torch.zeros((batch, x_day, adj_dim, adj_dim), device=device)
for i in range(batch):
x_mob_record, x_text_record = x_mob_batch[i], x_text_batch[i]
for j in range(x_day):
x_mob_one_day, x_text_one_day = x_mob_record[j], x_text_record[j]
#extract mob edges
for link in x_mob_one_day:
if link[0] != -1:
user, loc = link[0], link[1]
n_idx = n_user + loc
adj[i][j][user][n_idx] = adj[i][j][user][n_idx] + 1
adj[i][j][n_idx][user] = adj[i][j][user][n_idx]
else:
break
#extract text edges
for link in x_text_one_day:
if link[0] != -1:
user, loc = link[0], link[1]
n_idx = n_user + n_loc + loc
adj[i][j][user][n_idx] = adj[i][j][user][n_idx] + 1
adj[i][j][n_idx][user] = adj[i][j][user][n_idx]
else:
break
return adj
#6.1: one training epoch
#output: the average loss, model
def train_epoch(model, opt, criterion, train, hyper_param_dict, y_day, npr, loss_batch_all):
time_1 = time.time()
model.train()
losses = list()
n_user, n_loc, b_s = hyper_param["n_user"], hyper_param["n_loc"], hyper_param["b_s"]
x_u_v, x_poi, train_x_mob, train_x_text, train_y_mob =\
train["u_v"].to(device), train["x_poi"].to(device), train["x_mob"],\
train["x_text"], train["y_mob"]
n = train_x_mob.size()[0]
print ("# batch: ", int(n/b_s))
for i in range(0, n-b_s, b_s):
time_1 = time.time()
x_mob_batch, x_text_batch, y_mob_batch = train_x_mob[i:i + b_s], train_x_text[i:i + b_s], train_y_mob[i:i + b_s]
opt.zero_grad()
loss = torch.zeros(1, dtype=torch.float)
x_user = compute_user_embedding(x_poi, x_mob_batch, x_text_batch, n_user) #4.
x_adj = convert_to_adj(x_mob_batch, x_text_batch, n_user, n_loc) #5.
model_output = model.run(x_u_v, x_poi, x_user.to(device), x_adj.to(device), b_s)
loss = compute_loss(model_output.cpu(), y_mob_batch, criterion, n_user, n_loc, npr) #3.
loss_batch_all.append(loss.data.numpy()[0])
loss.backward()
opt.step()
losses.append(loss.data.numpy()) # sum over batches
time2 = time.time()
if i%20 == 0:
print ("i_batch: ", i/b_s)
print ("the loss is: ", loss.data.numpy()[0])
print ("time for this batch: ", round(time2 - time_1,3))
print ("-----------------a batch ends---------------")
return sum(losses)/float(len(losses)+0.000001), model, loss_batch_all
#6.2
def train_process(train, vali, test, net, criterion, hyper_param, y_day, loss_batch_all):
e_losses_train = list()
recall_vali, recall_test, ndcg_vali, ndcg_test = list(), list(), list(), list()
l_r, n_e, b_s = hyper_param["l_r"], hyper_param["n_e"], hyper_param["b_s"]
opt = optim.Adam(net.parameters(), l_r, betas = (0.9,0.999), weight_decay = 0.0001)
opt_scheduler = torch.optim.lr_scheduler.MultiStepLR(opt, milestones=[150])
print ("# epochs: ", n_e)
print ("------------------------------------------------------------")
time_start = time.time()
no_improve_in_n = 0
#prepare for vali and test
print ("start preparing for vali and test")
vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real = prepare_validate_test(vali, hyper_param)
print ("finish vali")
test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real = prepare_validate_test(test, hyper_param)
print ("finish test")
for i in range(n_e):
print ("i_epoch: ", i)
print ("----------------an epoch starts-------------------")
time1 = time.time()
n_train = len(train["x_mob"])
number_list = copy.copy(list(range(n_train)))
random.shuffle(number_list, random = r)
shuffle_idx = torch.tensor(number_list)
#train one epoch
train_shuffle = dict()
train_shuffle["u_v"] = train["u_v"]
train_shuffle["x_poi"], train_shuffle["x_mob"] = train["x_poi"], train["x_mob"][shuffle_idx]
train_shuffle["x_text"], train_shuffle["y_mob"] = train["x_text"][shuffle_idx], train["y_mob"][shuffle_idx]
loss, net, loss_batch_all = train_epoch(net, opt, criterion, train_shuffle, hyper_param, y_day, npr, loss_batch_all)
opt_scheduler.step()
loss = float(loss)
print ("train loss for this epoch: ", round(loss, 6))
e_losses_train.append(loss)
visual_train_loss(e_losses_train)
print ("----------------validate-------------------")
val_all_recall, val_all_ndcg, val_ave_recall, val_ave_ndcg =\
validate_test(net, hyper_param, \
vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real, False)
print ("----------------test-------------------")
test_all_recall, test_all_ndcg, test_ave_recall, test_ave_ndcg =\
validate_test(net, hyper_param,\
test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real, False)
if len(recall_vali) > 0:
past_max = np.max(recall_vali)
else:
past_max = 0.0
recall_vali.append(val_ave_recall)
recall_test.append(test_ave_recall)
ndcg_vali.append(val_ave_ndcg)
ndcg_test.append(test_ave_ndcg)
visual_vali_test_loss(recall_vali, recall_test, ndcg_vali, ndcg_test)
#store
performance = {"recall_val": recall_vali, "recall_test": recall_test, \
"ndcg_val": ndcg_vali,"ndcg_test": ndcg_test,\
"e_losses_train": e_losses_train}
subfile = open(case + '/' + 'performance'+'.json','w')
json.dump(performance, subfile)
subfile.close()
#early stop
if val_ave_recall < past_max:
no_improve_in_n = no_improve_in_n + 1
else:
no_improve_in_n = 0
if no_improve_in_n == 30:
print ("Early stop at the " + str(i+1) + "-th epoch")
return e_losses_train, net, loss_batch_all
time2 = time.time()
print ("running time for this epoch: ", time2 - time1)
time_now = time.time()
print ("running time until now: ", time_now - time_start)
print ("-------------------------an epoch ends ---------------------------")
return e_losses_train, net, loss_batch_all
#6.3
def model_train(train, vali, test, hyper_param, x_day, y_day, member):
with torch.autograd.set_detect_anomaly(True):
loss_batch_all = list()
model = WSBiGNN(hid_dim, hid_dim_cons, x_day, member).to(device)
criterion = nn.NLLLoss()
print ("start train_process")
e_losses, trained_model, loss_batch_all = train_process(train, vali, test, model,\
criterion, hyper_param, y_day, loss_batch_all)
return e_losses, trained_model, loss_batch_all
#7.1: compute Recall@K, NDCG@K
#input1: gnn_output dim = (batch, y_day, U, V)
#input2: real_link dim = (batch, y_day, n_edge, 2)
#inputs3,4: n_user, n_loc
#input5: top_k
#output: Recall@K, NDCG@K
def compute_recall_ndcg(gnn_output, real_link, n_user, n_loc, top_k):
batch, y_day = gnn_output.size()[0], gnn_output.size()[1]
recall_all = [[0.0 for j in range(y_day)] for i in range(batch)]
ndcg_all = [[0.0 for j in range(y_day)] for i in range(batch)]
for i in range(batch):
for j in range(y_day):
recall_user, ndcg_user = {}, {}
predicted, real = gnn_output[i][j].tolist(), real_link[i][j]
#1. construct the real mobility
real_list, real_dict = {user: [] for user in range(n_user)}, {user: {} for user in range(n_user)}
for k in range(len(real)):
edge = real[k]
user, poi = int(edge[0]), int(edge[1])
if user > -1:
real_list[user].append(poi)
else:
break
for user in real_list:
real_dict[user] = set(real_list[user])
#2. compute Recall@K, NDCG@K
for user in real_dict:
real_poi = real_dict[user]
len_real_poi = len(real_poi)
if len_real_poi > 0:
predict_row = predicted[user] #[0,0,12,1,5]
largest_k_idx = np.argsort(predict_row)[::-1] #[2,4,3,1,0]
top_k_idx = largest_k_idx[0: top_k] #[2,4,3]
#compute Recall
predict_top_k = set(top_k_idx)
recall_user[user] = len(predict_top_k.intersection(real_poi))*1.0/len_real_poi
#compute NDCG
weight = [1.0/(math.log(k+2)/math.log(2.0)) for k in range(top_k)]
#denominator
if len_real_poi < top_k:
best_rank = [1.0]*len_real_poi + [0.0]*(top_k-len_real_poi)
else:
best_rank = [1.0]*top_k
#numerator
predict_rank = [0.0]* top_k
for idx in range(len(top_k_idx)):
if top_k_idx[idx] in real_poi:
predict_rank[idx] = 1.0
#NDCG
ndcg_user[user] = float(np.dot(weight, predict_rank)/np.dot(weight, best_rank))
#3. compute the average Recall@k, average NDCG@k.
recall_all[i][j] = float(np.mean(list(recall_user.values())))
ndcg_all[i][j] = float(np.mean(list(ndcg_user.values())))
ave_recall, ave_ndcg = np.mean(recall_all), np.mean(ndcg_all)
print ("ave Recall", ave_recall)
print ("ave NDCG", ave_ndcg)
return recall_all, ndcg_all, ave_recall, ave_ndcg
#7.2: evaluate the trained model on validation or test
def prepare_validate_test(vali_test, hyper_param):
n_user, n_loc = hyper_param["n_user"], hyper_param["n_loc"]
u_v, x_poi, x_mob, x_text, y_real =\
vali_test["u_v"].to(device), vali_test["x_poi"].to(device), vali_test["x_mob"].to(device), \
vali_test["x_text"].to(device), vali_test["y_mob"]
x_user = compute_user_embedding(x_poi, x_mob, x_text, n_user)
x_adj = convert_to_adj(x_mob, x_text, n_user, n_loc)
return u_v, x_poi, x_user, x_adj, y_real
def validate_test(trained_model, hyper_param, u_v, x_poi, x_user, x_adj, y_real, output=False):
n_user, n_loc = hyper_param["n_user"], hyper_param["n_loc"]
top_k, b_s = hyper_param["top_k"], y_real.size()[0]
y_hat = trained_model.run(u_v, x_poi, x_user, x_adj, b_s)
all_recall, all_ndcg, ave_recall, ave_ndcg =\
compute_recall_ndcg(y_hat.cpu(), y_real, n_user, n_loc, top_k)
if output == True:
return all_recall, all_ndcg, ave_recall, ave_ndcg, y_hat.cpu(), y_real
else:
return all_recall, all_ndcg, ave_recall, ave_ndcg
#8.1: tensorize
def tensorize(train_vali_test):
result = dict()
result["u_v"] = torch.tensor(train_vali_test["u_v"])
result["x_poi"] = torch.tensor(train_vali_test["x_poi"])
result["x_mob"] = torch.tensor(train_vali_test["x_mob"])
result["x_text"] = torch.tensor(train_vali_test["x_text"])
result["y_mob"] = torch.tensor(train_vali_test["y_mob"])
return result
#8.2: load the data
train = tensorize(json.load(open(train_path)))
vali = tensorize(json.load(open(vali_path)))
test = tensorize(json.load(open(test_path)))
sampled_user_location = json.load(open(sampled_user_location_path))
sampled_user_location["n_user"] = len(sampled_user_location["u"])
sampled_user_location["n_loc"] = len(sampled_user_location["p"])
u_list, p_list = sampled_user_location["u"], sampled_user_location["p"]
hyper_param["n_user"], hyper_param["n_loc"] = len(u_list), len(p_list)
#supernode
member_dict = json.load(open(member_path + "member_" + case + ".json"))
#sg, s_ng, ns_g, ns_ng
member = torch.tensor([member_dict["s_g"], member_dict["s_ng"],\
member_dict["ns_g"], member_dict["ns_ng"]], device=device)
#8.3: model
e_losses, trained_model, loss_batch_all = model_train(train, vali, test, hyper_param,\
x_day, y_day, member)
start train_process # epochs: 200 ------------------------------------------------------------ start preparing for vali and test finish vali finish test i_epoch: 0 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 6.477359 time for this batch: 1.255 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 3.9430418 time for this batch: 0.759 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 2.7055726 time for this batch: 0.735 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 2.014565 time for this batch: 0.731 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 1.6269128 time for this batch: 0.666 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 1.3539512 time for this batch: 0.764 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 1.2084346 time for this batch: 0.709 -----------------a batch ends--------------- train loss for this epoch: 2.531696
----------------validate------------------- ave Recall 0.05693815256001392 ave NDCG 0.03922700274375758 ----------------test------------------- ave Recall 0.05997497324293003 ave NDCG 0.043093305563695825
running time for this epoch: 51.16649580001831 running time until now: 67.46622657775879 -------------------------an epoch ends --------------------------- i_epoch: 1 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 1.1860058 time for this batch: 0.796 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 1.0922484 time for this batch: 0.671 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 1.0256481 time for this batch: 0.72 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.97120595 time for this batch: 0.747 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.9226321 time for this batch: 0.778 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.8776356 time for this batch: 0.708 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.83918595 time for this batch: 0.706 -----------------a batch ends--------------- train loss for this epoch: 0.981356
----------------validate------------------- ave Recall 0.03011343675398704 ave NDCG 0.02062408499129158 ----------------test------------------- ave Recall 0.033220732052804645 ave NDCG 0.022592127898318024
running time for this epoch: 51.05114245414734 running time until now: 118.517418384552 -------------------------an epoch ends --------------------------- i_epoch: 2 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.8340231 time for this batch: 0.65 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.79562336 time for this batch: 0.738 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.75657153 time for this batch: 0.708 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.71679246 time for this batch: 0.722 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.67362285 time for this batch: 0.714 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.63028866 time for this batch: 0.681 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.578351 time for this batch: 0.694 -----------------a batch ends--------------- train loss for this epoch: 0.711064
----------------validate------------------- ave Recall 0.3390057810297156 ave NDCG 0.26906552788754856 ----------------test------------------- ave Recall 0.33963990394826993 ave NDCG 0.2691178320697356
running time for this epoch: 49.587443590164185 running time until now: 168.10492515563965 -------------------------an epoch ends --------------------------- i_epoch: 3 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.56908756 time for this batch: 0.672 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.5187553 time for this batch: 0.635 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.46811882 time for this batch: 0.728 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.42587838 time for this batch: 0.676 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.388988 time for this batch: 0.702 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.36506647 time for this batch: 0.719 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.34063143 time for this batch: 0.681 -----------------a batch ends--------------- train loss for this epoch: 0.436454
----------------validate------------------- ave Recall 0.3175003160229931 ave NDCG 0.25795316328602774 ----------------test------------------- ave Recall 0.3127782115387847 ave NDCG 0.25441284881345333
running time for this epoch: 49.26127099990845 running time until now: 217.36628675460815 -------------------------an epoch ends --------------------------- i_epoch: 4 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.34657308 time for this batch: 0.696 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.338945 time for this batch: 0.774 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.32335168 time for this batch: 0.692 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.3083706 time for this batch: 0.71 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.29016626 time for this batch: 0.694 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.2973991 time for this batch: 0.837 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.28647646 time for this batch: 0.71 -----------------a batch ends--------------- train loss for this epoch: 0.312438
----------------validate------------------- ave Recall 0.38520522422745596 ave NDCG 0.32283090925290936 ----------------test------------------- ave Recall 0.36728197280546193 ave NDCG 0.30353903801018844
running time for this epoch: 49.991400957107544 running time until now: 267.3577675819397 -------------------------an epoch ends --------------------------- i_epoch: 5 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.29732668 time for this batch: 0.674 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.2916827 time for this batch: 0.691 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.2729465 time for this batch: 0.682 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.2725046 time for this batch: 0.685 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.25942737 time for this batch: 0.703 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.26822343 time for this batch: 0.709 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.26514682 time for this batch: 0.823 -----------------a batch ends--------------- train loss for this epoch: 0.273401
----------------validate------------------- ave Recall 0.48952292277457055 ave NDCG 0.41274461187024447 ----------------test------------------- ave Recall 0.44824022676923875 ave NDCG 0.371734451934026
running time for this epoch: 49.285728931427 running time until now: 316.6435444355011 -------------------------an epoch ends --------------------------- i_epoch: 6 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.24387604 time for this batch: 0.676 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.24063051 time for this batch: 0.759 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.25417924 time for this batch: 0.747 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.24811795 time for this batch: 0.739 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.24182743 time for this batch: 0.703 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.25128832 time for this batch: 0.673 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.22371806 time for this batch: 0.719 -----------------a batch ends--------------- train loss for this epoch: 0.243158
----------------validate------------------- ave Recall 0.5589277394506841 ave NDCG 0.47729147589049997 ----------------test------------------- ave Recall 0.5242604165373298 ave NDCG 0.4401689544239774
running time for this epoch: 50.24819326400757 running time until now: 366.8917889595032 -------------------------an epoch ends --------------------------- i_epoch: 7 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.2338316 time for this batch: 0.699 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.21031371 time for this batch: 0.687 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.23088482 time for this batch: 0.735 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.22283196 time for this batch: 0.731 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.21039224 time for this batch: 0.734 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.20640996 time for this batch: 0.702 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.20107844 time for this batch: 0.719 -----------------a batch ends--------------- train loss for this epoch: 0.220894
----------------validate------------------- ave Recall 0.602994229233257 ave NDCG 0.518676856173946 ----------------test------------------- ave Recall 0.580729957338694 ave NDCG 0.4897776730307599
running time for this epoch: 50.30793833732605 running time until now: 417.1997756958008 -------------------------an epoch ends --------------------------- i_epoch: 8 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.20299688 time for this batch: 0.653 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.2061148 time for this batch: 0.673 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.20451012 time for this batch: 0.731 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.2301138 time for this batch: 0.709 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.2005733 time for this batch: 0.718 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.19170645 time for this batch: 0.706 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.1968262 time for this batch: 0.665 -----------------a batch ends--------------- train loss for this epoch: 0.205792
----------------validate------------------- ave Recall 0.6268872694430729 ave NDCG 0.5403895146673354 ----------------test------------------- ave Recall 0.6092892913970336 ave NDCG 0.5181440515127552
running time for this epoch: 50.01095986366272 running time until now: 467.2107810974121 -------------------------an epoch ends --------------------------- i_epoch: 9 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.18181932 time for this batch: 0.843 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.18918036 time for this batch: 0.855 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.19097711 time for this batch: 0.696 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.20487775 time for this batch: 0.747 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.19138217 time for this batch: 0.872 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.22555798 time for this batch: 0.758 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.20799766 time for this batch: 0.723 -----------------a batch ends--------------- train loss for this epoch: 0.194518
----------------validate------------------- ave Recall 0.6401487694177788 ave NDCG 0.5510986485437493 ----------------test------------------- ave Recall 0.6240867111069084 ave NDCG 0.5293329078176455
running time for this epoch: 53.619049310684204 running time until now: 520.8298811912537 -------------------------an epoch ends --------------------------- i_epoch: 10 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.17545736 time for this batch: 0.641 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.18119428 time for this batch: 0.693 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.1785013 time for this batch: 0.753 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.18384382 time for this batch: 0.715 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.19170055 time for this batch: 0.709 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.19672115 time for this batch: 0.718 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.19493508 time for this batch: 0.751 -----------------a batch ends--------------- train loss for this epoch: 0.184501
----------------validate------------------- ave Recall 0.6525360286838018 ave NDCG 0.5564179496045685 ----------------test------------------- ave Recall 0.6366689269742364 ave NDCG 0.5384076692489779
running time for this epoch: 50.248664140701294 running time until now: 571.0785839557648 -------------------------an epoch ends --------------------------- i_epoch: 11 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.18564443 time for this batch: 0.662 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.17023438 time for this batch: 0.706 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.18334523 time for this batch: 0.677 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.18018824 time for this batch: 0.731 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.1693922 time for this batch: 0.697 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.17526105 time for this batch: 0.741 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.18717796 time for this batch: 0.693 -----------------a batch ends--------------- train loss for this epoch: 0.177621
----------------validate------------------- ave Recall 0.6572508302383849 ave NDCG 0.5584637262765463 ----------------test------------------- ave Recall 0.6429001703323787 ave NDCG 0.5402615196548484
running time for this epoch: 48.84970998764038 running time until now: 619.9283444881439 -------------------------an epoch ends --------------------------- i_epoch: 12 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.17412269 time for this batch: 0.68 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.16782653 time for this batch: 0.73 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.17760864 time for this batch: 0.704 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1644866 time for this batch: 0.652 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.17873082 time for this batch: 0.701 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.17478779 time for this batch: 0.709 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.16898307 time for this batch: 0.673 -----------------a batch ends--------------- train loss for this epoch: 0.173822
----------------validate------------------- ave Recall 0.662873040009614 ave NDCG 0.5631887497713043 ----------------test------------------- ave Recall 0.6475742155097096 ave NDCG 0.5433750412159536
running time for this epoch: 49.03537654876709 running time until now: 668.9638104438782 -------------------------an epoch ends --------------------------- i_epoch: 13 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13064961 time for this batch: 0.632 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.16394848 time for this batch: 0.746 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.16517156 time for this batch: 0.745 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.16319378 time for this batch: 0.682 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15725711 time for this batch: 0.74 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.17505154 time for this batch: 0.677 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.19012335 time for this batch: 0.735 -----------------a batch ends--------------- train loss for this epoch: 0.168629
----------------validate------------------- ave Recall 0.6658923428227386 ave NDCG 0.5669282498768998 ----------------test------------------- ave Recall 0.6481897706177423 ave NDCG 0.5435950184998588
running time for this epoch: 49.59904646873474 running time until now: 718.5629227161407 -------------------------an epoch ends --------------------------- i_epoch: 14 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.1526429 time for this batch: 0.654 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.15854362 time for this batch: 0.82 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.1725716 time for this batch: 0.653 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.19055952 time for this batch: 0.661 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15583867 time for this batch: 0.744 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.1718224 time for this batch: 0.698 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.19701147 time for this batch: 0.672 -----------------a batch ends--------------- train loss for this epoch: 0.165614
----------------validate------------------- ave Recall 0.6675473726120085 ave NDCG 0.5663179972238281 ----------------test------------------- ave Recall 0.648415147005176 ave NDCG 0.5425258866952916
running time for this epoch: 52.12976908683777 running time until now: 770.6927318572998 -------------------------an epoch ends --------------------------- i_epoch: 15 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.15802778 time for this batch: 0.697 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.17189336 time for this batch: 0.568 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.15973134 time for this batch: 0.628 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15786916 time for this batch: 0.553 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15328193 time for this batch: 0.651 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.16873199 time for this batch: 0.681 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15977123 time for this batch: 0.724 -----------------a batch ends--------------- train loss for this epoch: 0.162305
----------------validate------------------- ave Recall 0.6660873764435945 ave NDCG 0.5638561717286222 ----------------test------------------- ave Recall 0.6456187172212153 ave NDCG 0.5426538942090942
running time for this epoch: 46.052778482437134 running time until now: 816.7455596923828 -------------------------an epoch ends --------------------------- i_epoch: 16 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.15705007 time for this batch: 0.724 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.16394454 time for this batch: 0.672 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.17841054 time for this batch: 0.73 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15268748 time for this batch: 0.754 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14730477 time for this batch: 0.728 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.16457836 time for this batch: 0.593 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15490672 time for this batch: 0.693 -----------------a batch ends--------------- train loss for this epoch: 0.158536
----------------validate------------------- ave Recall 0.6707175698694976 ave NDCG 0.5677093992632051 ----------------test------------------- ave Recall 0.6499568722940201 ave NDCG 0.544749506978818
running time for this epoch: 49.51753854751587 running time until now: 866.2631430625916 -------------------------an epoch ends --------------------------- i_epoch: 17 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14942323 time for this batch: 0.622 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.15033074 time for this batch: 0.709 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.15503792 time for this batch: 0.672 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15152854 time for this batch: 0.671 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15322186 time for this batch: 0.693 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.1583015 time for this batch: 0.691 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15026541 time for this batch: 0.687 -----------------a batch ends--------------- train loss for this epoch: 0.15692
----------------validate------------------- ave Recall 0.6692342367257063 ave NDCG 0.569220938762231 ----------------test------------------- ave Recall 0.6491451273192301 ave NDCG 0.5456114887157535
running time for this epoch: 50.41054058074951 running time until now: 916.6737475395203 -------------------------an epoch ends --------------------------- i_epoch: 18 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.16397305 time for this batch: 0.624 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.14558606 time for this batch: 0.706 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14696774 time for this batch: 0.706 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.17334044 time for this batch: 0.704 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.1424899 time for this batch: 0.907 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.15359224 time for this batch: 0.585 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14562632 time for this batch: 0.56 -----------------a batch ends--------------- train loss for this epoch: 0.154664
----------------validate------------------- ave Recall 0.6670990875570205 ave NDCG 0.5674436333628994 ----------------test------------------- ave Recall 0.6501517504351738 ave NDCG 0.5460314419632135
running time for this epoch: 48.092828035354614 running time until now: 964.766618013382 -------------------------an epoch ends --------------------------- i_epoch: 19 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.1274172 time for this batch: 0.602 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13784136 time for this batch: 0.602 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14146414 time for this batch: 0.592 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15374506 time for this batch: 0.573 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14585239 time for this batch: 0.572 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14690036 time for this batch: 0.552 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14864075 time for this batch: 0.596 -----------------a batch ends--------------- train loss for this epoch: 0.153848
----------------validate------------------- ave Recall 0.6663688277777958 ave NDCG 0.5667148273562457 ----------------test------------------- ave Recall 0.6524532029977538 ave NDCG 0.5473417648985633
running time for this epoch: 42.00338292121887 running time until now: 1006.7700417041779 -------------------------an epoch ends --------------------------- i_epoch: 20 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13935374 time for this batch: 0.726 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.15441836 time for this batch: 0.603 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14248855 time for this batch: 0.606 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13819793 time for this batch: 0.612 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14466321 time for this batch: 0.625 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.15972444 time for this batch: 0.634 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15858269 time for this batch: 0.603 -----------------a batch ends--------------- train loss for this epoch: 0.151189
----------------validate------------------- ave Recall 0.6765329080800274 ave NDCG 0.5709981480656142 ----------------test------------------- ave Recall 0.6590476903195213 ave NDCG 0.5465754673291379
running time for this epoch: 42.65772771835327 running time until now: 1049.4278099536896 -------------------------an epoch ends --------------------------- i_epoch: 21 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.15870444 time for this batch: 0.628 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.14472526 time for this batch: 0.607 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14008543 time for this batch: 0.676 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15044677 time for this batch: 0.747 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15529475 time for this batch: 0.65 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.16352989 time for this batch: 0.72 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13844384 time for this batch: 0.702 -----------------a batch ends--------------- train loss for this epoch: 0.149816
----------------validate------------------- ave Recall 0.6708634526659525 ave NDCG 0.5669939823699867 ----------------test------------------- ave Recall 0.650221710040867 ave NDCG 0.5393656263900689
running time for this epoch: 49.65387797355652 running time until now: 1099.0817313194275 -------------------------an epoch ends --------------------------- i_epoch: 22 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.15135188 time for this batch: 0.653 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.15085699 time for this batch: 0.663 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.16922295 time for this batch: 0.737 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13716224 time for this batch: 0.738 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15207596 time for this batch: 0.682 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.16032955 time for this batch: 0.675 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15119547 time for this batch: 0.708 -----------------a batch ends--------------- train loss for this epoch: 0.148482
----------------validate------------------- ave Recall 0.6730567582020051 ave NDCG 0.5704093070695324 ----------------test------------------- ave Recall 0.6532586723311605 ave NDCG 0.5427458624875682
running time for this epoch: 49.280407667160034 running time until now: 1148.3621847629547 -------------------------an epoch ends --------------------------- i_epoch: 23 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14052494 time for this batch: 0.673 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13937882 time for this batch: 0.721 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14627613 time for this batch: 0.65 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1538549 time for this batch: 0.712 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15601762 time for this batch: 0.749 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13866359 time for this batch: 0.699 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14433666 time for this batch: 0.69 -----------------a batch ends--------------- train loss for this epoch: 0.146854
----------------validate------------------- ave Recall 0.6697141830118112 ave NDCG 0.5671912385545866 ----------------test------------------- ave Recall 0.6492472582300142 ave NDCG 0.5422467615997617
running time for this epoch: 48.68981409072876 running time until now: 1197.052038192749 -------------------------an epoch ends --------------------------- i_epoch: 24 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14961842 time for this batch: 0.693 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13983902 time for this batch: 0.692 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13786384 time for this batch: 0.639 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15037519 time for this batch: 0.693 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14904681 time for this batch: 0.69 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13973056 time for this batch: 0.595 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15047014 time for this batch: 0.718 -----------------a batch ends--------------- train loss for this epoch: 0.146255
----------------validate------------------- ave Recall 0.6673592097999673 ave NDCG 0.5655883580982316 ----------------test------------------- ave Recall 0.6527860405879287 ave NDCG 0.5446900760779747
running time for this epoch: 47.43926024436951 running time until now: 1244.491354227066 -------------------------an epoch ends --------------------------- i_epoch: 25 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14285208 time for this batch: 0.666 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.15367416 time for this batch: 0.763 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13330562 time for this batch: 0.64 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14701022 time for this batch: 0.698 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14842558 time for this batch: 0.734 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14347637 time for this batch: 0.669 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15389042 time for this batch: 0.734 -----------------a batch ends--------------- train loss for this epoch: 0.146611
----------------validate------------------- ave Recall 0.6722569332784968 ave NDCG 0.5688910020169708 ----------------test------------------- ave Recall 0.6613772098111488 ave NDCG 0.5497468728280674
running time for this epoch: 48.35983395576477 running time until now: 1292.8512344360352 -------------------------an epoch ends --------------------------- i_epoch: 26 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12677845 time for this batch: 0.647 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.15015881 time for this batch: 0.678 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.1585061 time for this batch: 0.724 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15377447 time for this batch: 0.726 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.1466671 time for this batch: 0.675 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14931709 time for this batch: 0.734 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14852457 time for this batch: 0.72 -----------------a batch ends--------------- train loss for this epoch: 0.145152
----------------validate------------------- ave Recall 0.6709250277576437 ave NDCG 0.5683679220218933 ----------------test------------------- ave Recall 0.6593932162884371 ave NDCG 0.5493527083190101
running time for this epoch: 49.94680690765381 running time until now: 1342.7980835437775 -------------------------an epoch ends --------------------------- i_epoch: 27 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14899176 time for this batch: 0.639 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13746306 time for this batch: 0.696 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13665938 time for this batch: 0.694 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1520837 time for this batch: 0.595 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13976257 time for this batch: 0.593 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13354447 time for this batch: 0.592 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.16059476 time for this batch: 0.59 -----------------a batch ends--------------- train loss for this epoch: 0.144147
----------------validate------------------- ave Recall 0.6645742187187973 ave NDCG 0.5660456007275294 ----------------test------------------- ave Recall 0.6558164319187054 ave NDCG 0.5494475620313781
running time for this epoch: 44.232744216918945 running time until now: 1387.0308673381805 -------------------------an epoch ends --------------------------- i_epoch: 28 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.1462155 time for this batch: 0.713 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13135323 time for this batch: 0.595 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14111063 time for this batch: 0.571 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14458838 time for this batch: 0.568 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14766221 time for this batch: 0.564 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.1348212 time for this batch: 0.533 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15180477 time for this batch: 0.603 -----------------a batch ends--------------- train loss for this epoch: 0.142599
----------------validate------------------- ave Recall 0.66602750864807 ave NDCG 0.5660345684815247 ----------------test------------------- ave Recall 0.6569889766356611 ave NDCG 0.5529279932240477
running time for this epoch: 41.673288106918335 running time until now: 1428.704195022583 -------------------------an epoch ends --------------------------- i_epoch: 29 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.1344462 time for this batch: 0.623 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13393375 time for this batch: 0.619 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14146599 time for this batch: 0.583 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13153493 time for this batch: 0.617 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14374217 time for this batch: 0.592 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.1568462 time for this batch: 0.897 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.17545637 time for this batch: 0.677 -----------------a batch ends--------------- train loss for this epoch: 0.142596
----------------validate------------------- ave Recall 0.6706788067635395 ave NDCG 0.5652877009541478 ----------------test------------------- ave Recall 0.6580621591490061 ave NDCG 0.548909028835987
running time for this epoch: 45.30395770072937 running time until now: 1474.0081932544708 -------------------------an epoch ends --------------------------- i_epoch: 30 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14680916 time for this batch: 0.657 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12405212 time for this batch: 0.712 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13443139 time for this batch: 0.71 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1286326 time for this batch: 0.634 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14367229 time for this batch: 0.723 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.15927695 time for this batch: 0.748 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15994757 time for this batch: 0.714 -----------------a batch ends--------------- train loss for this epoch: 0.141217
----------------validate------------------- ave Recall 0.6682654076276774 ave NDCG 0.5673603504953265 ----------------test------------------- ave Recall 0.6599687409239583 ave NDCG 0.552718892417516
running time for this epoch: 49.8833954334259 running time until now: 1523.8916280269623 -------------------------an epoch ends --------------------------- i_epoch: 31 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13106596 time for this batch: 0.728 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13272798 time for this batch: 0.891 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12999177 time for this batch: 0.714 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13766113 time for this batch: 0.699 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14640233 time for this batch: 0.728 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.1503998 time for this batch: 0.632 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15685421 time for this batch: 0.709 -----------------a batch ends--------------- train loss for this epoch: 0.14234
----------------validate------------------- ave Recall 0.6758131230194147 ave NDCG 0.5709853141537802 ----------------test------------------- ave Recall 0.6547700878034006 ave NDCG 0.5508969517223251
running time for this epoch: 50.56905961036682 running time until now: 1574.460735797882 -------------------------an epoch ends --------------------------- i_epoch: 32 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13497162 time for this batch: 0.818 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13443336 time for this batch: 0.738 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13024949 time for this batch: 0.73 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14049311 time for this batch: 0.741 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13620603 time for this batch: 0.648 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.15166235 time for this batch: 0.695 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15238929 time for this batch: 0.711 -----------------a batch ends--------------- train loss for this epoch: 0.141718
----------------validate------------------- ave Recall 0.674358266185916 ave NDCG 0.5726936846762931 ----------------test------------------- ave Recall 0.6596606306887218 ave NDCG 0.5548351573347768
running time for this epoch: 51.51469564437866 running time until now: 1625.9754774570465 -------------------------an epoch ends --------------------------- i_epoch: 33 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12474347 time for this batch: 0.66 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13373685 time for this batch: 0.687 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13404557 time for this batch: 0.69 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1510579 time for this batch: 0.705 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13528478 time for this batch: 0.698 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13289389 time for this batch: 0.706 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13482836 time for this batch: 0.706 -----------------a batch ends--------------- train loss for this epoch: 0.140111
----------------validate------------------- ave Recall 0.671250082962019 ave NDCG 0.5637081317158519 ----------------test------------------- ave Recall 0.6568100344143057 ave NDCG 0.5516876864668876
running time for this epoch: 49.15786933898926 running time until now: 1675.1333875656128 -------------------------an epoch ends --------------------------- i_epoch: 34 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13452831 time for this batch: 0.694 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13576165 time for this batch: 0.683 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13518904 time for this batch: 0.704 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14320639 time for this batch: 0.751 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15939367 time for this batch: 0.897 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.15491308 time for this batch: 0.9 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14382385 time for this batch: 0.743 -----------------a batch ends--------------- train loss for this epoch: 0.140794
----------------validate------------------- ave Recall 0.6720794557184889 ave NDCG 0.5670962168527116 ----------------test------------------- ave Recall 0.656323670557322 ave NDCG 0.5494033313344193
running time for this epoch: 53.614506244659424 running time until now: 1728.7479503154755 -------------------------an epoch ends --------------------------- i_epoch: 35 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14718169 time for this batch: 0.695 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12807518 time for this batch: 0.65 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14315692 time for this batch: 0.699 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.15302669 time for this batch: 0.679 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13540775 time for this batch: 0.747 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.111720674 time for this batch: 0.725 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14069676 time for this batch: 0.648 -----------------a batch ends--------------- train loss for this epoch: 0.138607
----------------validate------------------- ave Recall 0.6707955299301116 ave NDCG 0.568855417764754 ----------------test------------------- ave Recall 0.657264319089455 ave NDCG 0.5513516017100044
running time for this epoch: 48.438891649246216 running time until now: 1777.186892747879 -------------------------an epoch ends --------------------------- i_epoch: 36 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13370866 time for this batch: 0.644 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13704269 time for this batch: 0.684 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13326673 time for this batch: 0.733 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12218891 time for this batch: 0.861 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13789651 time for this batch: 0.715 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13466641 time for this batch: 0.714 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15373906 time for this batch: 0.654 -----------------a batch ends--------------- train loss for this epoch: 0.140341
----------------validate------------------- ave Recall 0.6804734952175356 ave NDCG 0.5739875162952575 ----------------test------------------- ave Recall 0.655966144135443 ave NDCG 0.5483891293516402
running time for this epoch: 48.61654996871948 running time until now: 1825.8034913539886 -------------------------an epoch ends --------------------------- i_epoch: 37 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12541199 time for this batch: 0.631 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.119727015 time for this batch: 0.699 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13389629 time for this batch: 0.688 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13148104 time for this batch: 0.668 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14002751 time for this batch: 0.664 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.16034487 time for this batch: 0.695 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14854738 time for this batch: 0.708 -----------------a batch ends--------------- train loss for this epoch: 0.138807
----------------validate------------------- ave Recall 0.6798893468872563 ave NDCG 0.5730131833601435 ----------------test------------------- ave Recall 0.6667795183957916 ave NDCG 0.5546854277813753
running time for this epoch: 48.71493101119995 running time until now: 1874.5184681415558 -------------------------an epoch ends --------------------------- i_epoch: 38 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14052993 time for this batch: 0.645 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13840252 time for this batch: 0.705 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.1476466 time for this batch: 0.734 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12992051 time for this batch: 0.72 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13976619 time for this batch: 0.728 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13240732 time for this batch: 0.686 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14146553 time for this batch: 0.722 -----------------a batch ends--------------- train loss for this epoch: 0.138717
----------------validate------------------- ave Recall 0.672115721170349 ave NDCG 0.5656401071269205 ----------------test------------------- ave Recall 0.6603911822043635 ave NDCG 0.5503846889332955
running time for this epoch: 48.25029921531677 running time until now: 1922.7688093185425 -------------------------an epoch ends --------------------------- i_epoch: 39 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13838917 time for this batch: 0.758 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.1336285 time for this batch: 0.634 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.11983432 time for this batch: 0.666 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14402613 time for this batch: 0.695 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15299416 time for this batch: 0.877 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14750901 time for this batch: 0.713 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14290532 time for this batch: 0.686 -----------------a batch ends--------------- train loss for this epoch: 0.136211
----------------validate------------------- ave Recall 0.6774814884780817 ave NDCG 0.5721324485906621 ----------------test------------------- ave Recall 0.6597217294102405 ave NDCG 0.551619694968433
running time for this epoch: 48.01871061325073 running time until now: 1970.7875635623932 -------------------------an epoch ends --------------------------- i_epoch: 40 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14478433 time for this batch: 0.658 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12490897 time for this batch: 0.677 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13481513 time for this batch: 0.725 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.117651165 time for this batch: 0.697 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14145997 time for this batch: 0.689 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14995632 time for this batch: 0.744 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13672361 time for this batch: 0.702 -----------------a batch ends--------------- train loss for this epoch: 0.13753
----------------validate------------------- ave Recall 0.6779641744436997 ave NDCG 0.5738649726972023 ----------------test------------------- ave Recall 0.6563427225685379 ave NDCG 0.550923532471329
running time for this epoch: 47.983537673950195 running time until now: 2018.7711606025696 -------------------------an epoch ends --------------------------- i_epoch: 41 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.14648914 time for this batch: 0.615 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13537827 time for this batch: 0.77 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.1444289 time for this batch: 0.675 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13609587 time for this batch: 0.617 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13528098 time for this batch: 0.681 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14996623 time for this batch: 0.708 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13196501 time for this batch: 0.68 -----------------a batch ends--------------- train loss for this epoch: 0.136151
----------------validate------------------- ave Recall 0.6793910486996109 ave NDCG 0.5750991869171153 ----------------test------------------- ave Recall 0.666479889651131 ave NDCG 0.5577363194119582
running time for this epoch: 47.97637462615967 running time until now: 2066.747579574585 -------------------------an epoch ends --------------------------- i_epoch: 42 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13686946 time for this batch: 0.655 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12570468 time for this batch: 0.727 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12654835 time for this batch: 0.693 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13168645 time for this batch: 0.63 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13709971 time for this batch: 0.646 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14182097 time for this batch: 0.706 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.1433433 time for this batch: 0.729 -----------------a batch ends--------------- train loss for this epoch: 0.137684
----------------validate------------------- ave Recall 0.6757442073702137 ave NDCG 0.5709607008398027 ----------------test------------------- ave Recall 0.6582937674645994 ave NDCG 0.5491016111130113
running time for this epoch: 49.13630223274231 running time until now: 2115.883930683136 -------------------------an epoch ends --------------------------- i_epoch: 43 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13126954 time for this batch: 0.858 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13325676 time for this batch: 0.724 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13826886 time for this batch: 0.714 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12872627 time for this batch: 0.731 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.16519925 time for this batch: 0.746 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.12933493 time for this batch: 0.72 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15524608 time for this batch: 0.745 -----------------a batch ends--------------- train loss for this epoch: 0.13734
----------------validate------------------- ave Recall 0.6717904469986687 ave NDCG 0.567969416962046 ----------------test------------------- ave Recall 0.6580907915943501 ave NDCG 0.550918986898659
running time for this epoch: 50.128389835357666 running time until now: 2166.0123705863953 -------------------------an epoch ends --------------------------- i_epoch: 44 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13457394 time for this batch: 0.647 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.1280052 time for this batch: 0.723 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12130031 time for this batch: 0.675 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.121457875 time for this batch: 0.853 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13234165 time for this batch: 0.686 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13485347 time for this batch: 0.655 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14131631 time for this batch: 0.717 -----------------a batch ends--------------- train loss for this epoch: 0.136492
----------------validate------------------- ave Recall 0.676531691936375 ave NDCG 0.5675750785254712 ----------------test------------------- ave Recall 0.6575944265360679 ave NDCG 0.5493154987571149
running time for this epoch: 48.541646003723145 running time until now: 2214.554067850113 -------------------------an epoch ends --------------------------- i_epoch: 45 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12561844 time for this batch: 0.904 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12435785 time for this batch: 0.685 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13782227 time for this batch: 0.708 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14125375 time for this batch: 0.737 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13786636 time for this batch: 0.672 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13056025 time for this batch: 0.684 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13688403 time for this batch: 0.676 -----------------a batch ends--------------- train loss for this epoch: 0.135472
----------------validate------------------- ave Recall 0.6720778493551122 ave NDCG 0.5657510048804607 ----------------test------------------- ave Recall 0.6626569378983331 ave NDCG 0.5528820251902075
running time for this epoch: 48.77956032752991 running time until now: 2263.333669900894 -------------------------an epoch ends --------------------------- i_epoch: 46 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12702993 time for this batch: 0.649 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13076155 time for this batch: 0.698 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12370591 time for this batch: 0.653 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13766253 time for this batch: 0.711 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13913733 time for this batch: 0.719 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14332578 time for this batch: 0.7 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13511284 time for this batch: 0.7 -----------------a batch ends--------------- train loss for this epoch: 0.136489
----------------validate------------------- ave Recall 0.6715173497836399 ave NDCG 0.5652839010911694 ----------------test------------------- ave Recall 0.6495929856385521 ave NDCG 0.5438295229875206
running time for this epoch: 47.55072736740112 running time until now: 2310.8844361305237 -------------------------an epoch ends --------------------------- i_epoch: 47 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.1332716 time for this batch: 0.667 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.10014257 time for this batch: 0.755 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12072708 time for this batch: 0.71 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12647453 time for this batch: 0.675 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.15335798 time for this batch: 0.669 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13255739 time for this batch: 0.722 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.15533935 time for this batch: 0.675 -----------------a batch ends--------------- train loss for this epoch: 0.134592
----------------validate------------------- ave Recall 0.6639524640324586 ave NDCG 0.5605750213358829 ----------------test------------------- ave Recall 0.6524245641613429 ave NDCG 0.5462343208597558
running time for this epoch: 47.45052742958069 running time until now: 2358.3350026607513 -------------------------an epoch ends --------------------------- i_epoch: 48 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13734853 time for this batch: 0.686 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12549733 time for this batch: 0.629 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12391926 time for this batch: 0.732 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1383574 time for this batch: 0.721 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.14221202 time for this batch: 0.689 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13670367 time for this batch: 0.679 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14323677 time for this batch: 0.721 -----------------a batch ends--------------- train loss for this epoch: 0.133808
----------------validate------------------- ave Recall 0.6657000726827231 ave NDCG 0.5642447440673839 ----------------test------------------- ave Recall 0.6541063930635957 ave NDCG 0.5458220580082846
running time for this epoch: 47.92552351951599 running time until now: 2406.260565519333 -------------------------an epoch ends --------------------------- i_epoch: 49 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12500705 time for this batch: 0.639 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.123395726 time for this batch: 0.703 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13346978 time for this batch: 0.716 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14301628 time for this batch: 0.692 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13322717 time for this batch: 0.663 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14983426 time for this batch: 0.663 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13379748 time for this batch: 0.741 -----------------a batch ends--------------- train loss for this epoch: 0.134684
----------------validate------------------- ave Recall 0.6679041273444759 ave NDCG 0.5645525029494374 ----------------test------------------- ave Recall 0.6543515930336974 ave NDCG 0.5481343206606663
running time for this epoch: 48.392822265625 running time until now: 2454.653436899185 -------------------------an epoch ends --------------------------- i_epoch: 50 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13867266 time for this batch: 0.652 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13514924 time for this batch: 0.722 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12391424 time for this batch: 0.889 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13080272 time for this batch: 0.715 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13152494 time for this batch: 0.662 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13524882 time for this batch: 0.705 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13671702 time for this batch: 0.714 -----------------a batch ends--------------- train loss for this epoch: 0.134575
----------------validate------------------- ave Recall 0.6619636766496535 ave NDCG 0.5640653820976023 ----------------test------------------- ave Recall 0.658734383105512 ave NDCG 0.5504170630607059
running time for this epoch: 52.18464255332947 running time until now: 2506.838117837906 -------------------------an epoch ends --------------------------- i_epoch: 51 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12335866 time for this batch: 0.651 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12456718 time for this batch: 0.719 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12132129 time for this batch: 0.658 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13879797 time for this batch: 0.734 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13018128 time for this batch: 0.64 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.1295047 time for this batch: 0.682 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14915638 time for this batch: 0.676 -----------------a batch ends--------------- train loss for this epoch: 0.133831
----------------validate------------------- ave Recall 0.6682307727608227 ave NDCG 0.5660741349537247 ----------------test------------------- ave Recall 0.6555670054837249 ave NDCG 0.5480353207839843
running time for this epoch: 48.0551655292511 running time until now: 2554.8933222293854 -------------------------an epoch ends --------------------------- i_epoch: 52 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13010994 time for this batch: 0.614 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12565362 time for this batch: 0.712 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14493147 time for this batch: 0.725 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13331941 time for this batch: 0.707 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13372822 time for this batch: 0.761 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14664665 time for this batch: 0.732 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14820659 time for this batch: 0.763 -----------------a batch ends--------------- train loss for this epoch: 0.134441
----------------validate------------------- ave Recall 0.6669426384815931 ave NDCG 0.5634867569125824 ----------------test------------------- ave Recall 0.6565275883196686 ave NDCG 0.5458337673264352
running time for this epoch: 49.263832092285156 running time until now: 2604.1571934223175 -------------------------an epoch ends --------------------------- i_epoch: 53 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13874874 time for this batch: 0.685 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.11886795 time for this batch: 0.735 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.11996261 time for this batch: 0.714 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13215627 time for this batch: 0.737 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.12892313 time for this batch: 0.768 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13369228 time for this batch: 0.763 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14073011 time for this batch: 0.708 -----------------a batch ends--------------- train loss for this epoch: 0.133678
----------------validate------------------- ave Recall 0.6710391749627003 ave NDCG 0.565891945231926 ----------------test------------------- ave Recall 0.6511873185273997 ave NDCG 0.5438817143993832
running time for this epoch: 49.45081090927124 running time until now: 2653.6080436706543 -------------------------an epoch ends --------------------------- i_epoch: 54 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13568828 time for this batch: 0.624 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.14228746 time for this batch: 0.765 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14596477 time for this batch: 0.644 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14731765 time for this batch: 0.707 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.1301454 time for this batch: 0.723 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.124971166 time for this batch: 0.695 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.1335602 time for this batch: 0.727 -----------------a batch ends--------------- train loss for this epoch: 0.133238
----------------validate------------------- ave Recall 0.6730903693590756 ave NDCG 0.5655838290519363 ----------------test------------------- ave Recall 0.6582530531072859 ave NDCG 0.5469459572600391
running time for this epoch: 48.50052547454834 running time until now: 2702.108608484268 -------------------------an epoch ends --------------------------- i_epoch: 55 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13446227 time for this batch: 0.71 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13536114 time for this batch: 0.635 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13478234 time for this batch: 0.651 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12773353 time for this batch: 0.683 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.12578027 time for this batch: 0.711 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.1479266 time for this batch: 0.693 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13160211 time for this batch: 0.69 -----------------a batch ends--------------- train loss for this epoch: 0.134946
----------------validate------------------- ave Recall 0.6752504229164396 ave NDCG 0.5674788062889938 ----------------test------------------- ave Recall 0.6626109701726808 ave NDCG 0.5497576128720018
running time for this epoch: 49.64940309524536 running time until now: 2751.7580530643463 -------------------------an epoch ends --------------------------- i_epoch: 56 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12529984 time for this batch: 0.664 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13026135 time for this batch: 0.645 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12188919 time for this batch: 0.691 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12541041 time for this batch: 0.718 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13377075 time for this batch: 0.708 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13428345 time for this batch: 0.71 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13348201 time for this batch: 0.728 -----------------a batch ends--------------- train loss for this epoch: 0.132772
----------------validate------------------- ave Recall 0.673440948216071 ave NDCG 0.5678307603149918 ----------------test------------------- ave Recall 0.6565611790781413 ave NDCG 0.54852289447977
running time for this epoch: 48.771772146224976 running time until now: 2800.529880285263 -------------------------an epoch ends --------------------------- i_epoch: 57 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13547353 time for this batch: 0.668 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13743693 time for this batch: 0.729 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14800556 time for this batch: 0.709 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.14380309 time for this batch: 0.707 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.1531843 time for this batch: 0.681 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14208448 time for this batch: 0.627 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14355633 time for this batch: 0.822 -----------------a batch ends--------------- train loss for this epoch: 0.133301
----------------validate------------------- ave Recall 0.6788147351356503 ave NDCG 0.5716407197188805 ----------------test------------------- ave Recall 0.663297228798283 ave NDCG 0.5550912121268482
running time for this epoch: 47.65136694908142 running time until now: 2848.1812851428986 -------------------------an epoch ends --------------------------- i_epoch: 58 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.125516 time for this batch: 0.652 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.1302251 time for this batch: 0.759 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13285106 time for this batch: 0.749 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1214974 time for this batch: 0.706 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13814823 time for this batch: 0.672 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13362439 time for this batch: 0.676 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14093593 time for this batch: 0.703 -----------------a batch ends--------------- train loss for this epoch: 0.132077
----------------validate------------------- ave Recall 0.6722494480527581 ave NDCG 0.5677186679302617 ----------------test------------------- ave Recall 0.6551036208099479 ave NDCG 0.5507642299556689
running time for this epoch: 48.12085843086243 running time until now: 2896.3021881580353 -------------------------an epoch ends --------------------------- i_epoch: 59 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.1324804 time for this batch: 0.662 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12166049 time for this batch: 0.691 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12934384 time for this batch: 0.833 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12835528 time for this batch: 0.64 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13043617 time for this batch: 0.678 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.12803873 time for this batch: 0.705 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.14034238 time for this batch: 0.77 -----------------a batch ends--------------- train loss for this epoch: 0.13182
----------------validate------------------- ave Recall 0.6730296350557969 ave NDCG 0.5672905528247003 ----------------test------------------- ave Recall 0.6504335554399177 ave NDCG 0.5450542478802396
running time for this epoch: 49.05012321472168 running time until now: 2945.3523519039154 -------------------------an epoch ends --------------------------- i_epoch: 60 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12742731 time for this batch: 0.652 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13173091 time for this batch: 0.704 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12203048 time for this batch: 0.699 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12152149 time for this batch: 0.693 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.12962832 time for this batch: 0.935 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14802417 time for this batch: 0.752 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13543148 time for this batch: 0.791 -----------------a batch ends--------------- train loss for this epoch: 0.132064
----------------validate------------------- ave Recall 0.6687309700569982 ave NDCG 0.5657153247742874 ----------------test------------------- ave Recall 0.6539344162244842 ave NDCG 0.5468834388020317
running time for this epoch: 51.11239171028137 running time until now: 2996.4647829532623 -------------------------an epoch ends --------------------------- i_epoch: 61 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.11641969 time for this batch: 0.638 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12517223 time for this batch: 0.627 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13604864 time for this batch: 0.675 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13767642 time for this batch: 0.704 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.12495218 time for this batch: 0.67 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.12825985 time for this batch: 0.669 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13578054 time for this batch: 0.68 -----------------a batch ends--------------- train loss for this epoch: 0.131988
----------------validate------------------- ave Recall 0.673953942257474 ave NDCG 0.5685407056072971 ----------------test------------------- ave Recall 0.6627065874897855 ave NDCG 0.5512223507162921
running time for this epoch: 48.18002104759216 running time until now: 3044.6448447704315 -------------------------an epoch ends --------------------------- i_epoch: 62 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.13185695 time for this batch: 0.669 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13881561 time for this batch: 0.732 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12829277 time for this batch: 0.688 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1213585 time for this batch: 0.71 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.12633008 time for this batch: 0.768 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.14375195 time for this batch: 0.711 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13572058 time for this batch: 0.725 -----------------a batch ends--------------- train loss for this epoch: 0.130614
----------------validate------------------- ave Recall 0.6766681156420543 ave NDCG 0.5691494011192282 ----------------test------------------- ave Recall 0.6594955040999011 ave NDCG 0.5495544216863566
running time for this epoch: 48.693207025527954 running time until now: 3093.338094472885 -------------------------an epoch ends --------------------------- i_epoch: 63 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.123376615 time for this batch: 0.666 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13547179 time for this batch: 0.727 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.13568383 time for this batch: 0.698 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12173269 time for this batch: 0.675 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13500616 time for this batch: 0.724 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.12949234 time for this batch: 0.676 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13774678 time for this batch: 0.738 -----------------a batch ends--------------- train loss for this epoch: 0.132113
----------------validate------------------- ave Recall 0.6671284041186198 ave NDCG 0.5646198699558557 ----------------test------------------- ave Recall 0.6555902647441869 ave NDCG 0.5489486998012383
running time for this epoch: 49.281577348709106 running time until now: 3142.619713306427 -------------------------an epoch ends --------------------------- i_epoch: 64 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.1270085 time for this batch: 0.681 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.12664063 time for this batch: 0.721 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12208699 time for this batch: 0.694 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.1378943 time for this batch: 0.646 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13698368 time for this batch: 0.7 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.13512982 time for this batch: 0.65 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.13854651 time for this batch: 0.709 -----------------a batch ends--------------- train loss for this epoch: 0.13113
----------------validate------------------- ave Recall 0.6680692159986192 ave NDCG 0.564085960814023 ----------------test------------------- ave Recall 0.6617746534583548 ave NDCG 0.5519763870238007
running time for this epoch: 48.400933265686035 running time until now: 3191.0206871032715 -------------------------an epoch ends --------------------------- i_epoch: 65 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.11939138 time for this batch: 0.663 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.13049507 time for this batch: 0.66 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.12469838 time for this batch: 0.696 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.12910357 time for this batch: 0.727 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13419572 time for this batch: 0.679 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.12926984 time for this batch: 0.637 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.12906992 time for this batch: 0.695 -----------------a batch ends--------------- train loss for this epoch: 0.130481
----------------validate------------------- ave Recall 0.6713254454812702 ave NDCG 0.5677003889446414 ----------------test------------------- ave Recall 0.6599881818465502 ave NDCG 0.5512384963020477
running time for this epoch: 48.54800724983215 running time until now: 3239.568736553192 -------------------------an epoch ends --------------------------- i_epoch: 66 ----------------an epoch starts------------------- # batch: 62 i_batch: 0.0 the loss is: 0.12058504 time for this batch: 0.653 -----------------a batch ends--------------- i_batch: 10.0 the loss is: 0.133163 time for this batch: 0.71 -----------------a batch ends--------------- i_batch: 20.0 the loss is: 0.14296883 time for this batch: 0.694 -----------------a batch ends--------------- i_batch: 30.0 the loss is: 0.13976918 time for this batch: 0.573 -----------------a batch ends--------------- i_batch: 40.0 the loss is: 0.13907433 time for this batch: 0.681 -----------------a batch ends--------------- i_batch: 50.0 the loss is: 0.12785392 time for this batch: 0.714 -----------------a batch ends--------------- i_batch: 60.0 the loss is: 0.12812838 time for this batch: 0.697 -----------------a batch ends--------------- train loss for this epoch: 0.13093
----------------validate------------------- ave Recall 0.6745425798821306 ave NDCG 0.5693005775592694 ----------------test------------------- ave Recall 0.6646311009775923 ave NDCG 0.5550816101730496
Early stop at the 67-th epoch
print ("start preparing for vali and test")
vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real = prepare_validate_test(vali, hyper_param)
test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real = prepare_validate_test(test, hyper_param)
start preparing for vali and test
#8.4: validate and test the model
print ("---------------validation-------------------")
all_recall, all_ndcg, ave_recall, ave_ndcg, vali_output, vali_real =\
validate_test(trained_model, hyper_param, vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real, True)
print ("-----------finish model validation---------------")
---------------validation------------------- ave Recall 0.6745425798821306 ave NDCG 0.5693005775592694 -----------finish model validation---------------
print ("---------------test-------------------")
all_recall, all_ndcg, ave_recall, ave_ndcg, test_output, test_real =\
validate_test(trained_model, hyper_param, test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real, True)
print ("-----------finish model validation---------------")
---------------test------------------- ave Recall 0.6646311009775923 ave NDCG 0.5550816101730496 -----------finish model validation---------------
list_vali_hat = vali_output.cpu().detach().numpy().tolist()
list_vali_real = vali_real.cpu().detach().numpy().tolist()
print(len(list_vali_hat))
print(len(list_vali_hat[0]))
print(len(list_vali_hat[0][0]))
print(len(list_vali_hat[0][0][0]))
list_test_hat = test_output.cpu().detach().numpy().tolist()
list_test_real = test_real.cpu().detach().numpy().tolist()
print(len(list_test_hat))
print(len(list_test_hat[0]))
print(len(list_test_hat[0][0]))
print(len(list_test_hat[0][0][0]))
18 1 1827 80 36 1 1827 80
result = {"vali_hat": list_vali_hat, "vali_real": list_vali_real, \
"test_hat": list_test_hat, "test_real": list_test_real}
subfile = case+'/vali_predict.json'
savefile = open(subfile,'w')
json.dump(result, savefile)
savefile.close()
df = json.load(open(subfile))
df.keys()
print(len(df["test_real"]))
36